Apple, the Apple logo, and Macintosh are registered trademarks of Apple Computer, Inc.
Mac and OpenDoc are trademarks of Apple Computer, Inc.
Introduction
The UI Events subsystem of OpenDoc is responsible for window and menu management and the distribution of events to parts.
List of Recipes
Opening and Closing Windows
Opening a Part into a Window
Activation
Dialogs
Shared Utility Windows
Basic Event Handling
Mouse Events
Window Events
Menus
Implementing a Dispatch Module
Implementing a Focus Module
Many of these recipes are virtually identical to their DR3 counterparts. New information has generally been labelled New in DR4, and the source code has been updated in some cases.
Source Code Examples
The code snippets in these recipes are mostly taken from the Test Clock part, source code for which is included with these recipes. Error checking is noticeably absent. The test clock is not included in binary form, though the fine ODFClock is.
It's a good idea to look at the official sample part editors as well.
Structure of Clock Part
The Clock part is implemented with several C++ classes. The System Object Model™ (SOM) class representing the part has a single instance variable which is a C++ object containing all the part instance data as well as methods to delegate to. A C++ object is also attached to each frame's part info, and some methods of the SOM class delegate to that object.